package com.example.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.dao.UserRepository;
import com.example.pojo.User;
import com.example.service.JpaService;

@RestController
public class JpaController {
	@Autowired
	private JpaService jpaService;
	
	@RequestMapping("/getUserByName")
	public List<User> getUserByName(String name){
		List<User> user = jpaService.findUsersByName(name);
		return user;
	}
}
